import fetch from '../utils/fetch'
import config from '../utils/config'
import { querystring } from 'vux'
var BidForenoticeInvitedService = {
  getInviteBidQuestion (providerGUID, inviteBidGUID) {
    var data = {
      action: 'GetInviteBidQuestion',
      ProviderGUID: providerGUID,
      InviteBidGUID: inviteBidGUID
    }
    var url = config.API_SERVER + '/WXApi.ajax'
    return fetch({
      url: url,
      params: data
    })
  },
  submitInviteBidQuestion: function (inviteBidQuestionData) {
    inviteBidQuestionData.action = 'SubmitInviteBidQuestion'
    inviteBidQuestionData.handleType = 'submit&add'
    var url = config.API_SERVER + '/WXApi.ajax'
    return fetch({
      url: url,
      method: 'POST',
      data: querystring.stringify(inviteBidQuestionData),
      headers: {'Content-Type': 'application/x-www-form-urlencoded'}
    })
  }
}

export default BidForenoticeInvitedService
